<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
	<%	
	String path = request.getContextPath();
	String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/"; 
	%>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link href="<%=basePath %>web/css/style.css" rel="stylesheet" type="text/css"/>
<link href="<%=basePath %>web/css/index.css" rel="stylesheet" type="text/css"/>
<script src="<%=basePath %>web/js/jQuery.js" type="text/javascript"></script>
<script src="<%=basePath %>web/js/format.js" type="text/javascript"></script>
<script type="text/javascript">
  function goToPage(pageNo,pageSize){
	  $.ajax({
		  url:'<%=basePath %>tempuser/templist',
		  type:'post',
		  data:{
			  pageNo:pageNo,
			  pageSize:pageSize
		  },
		  success:function(data){
			  $(".pwsj_right_czrz_cont").empty();
			  var list = data.records;
			for (var i = 0; i < list.length; i++) {
				var rolestr='';
				var roleList = list[i].rolelist;
				for (var j = 0; j < roleList.length; j++) {
					rolestr += roleList[j].roleName+'、';
				}
				rolestr =rolestr.substring(0, rolestr.length-1);
			  var content=
				  '<ul class="czrz_cont_ul">'
			+'<li class="number" style="width:6%;">'+(i+1)+'</li>'
			+'<li class="time" style="width:32%;">'+list[i].loginName+'</li>'
			+'<li class="username" style="width:16%;">'+list[i].userName+'</li>'
			+'<li class="role" style="width:30%;">'+rolestr+'</li>'
			+'<li class="operate" style="width:14%;border-right: none;">'
			+' <a class="detail_a" href="javascript:login('+list[i].companyUserId+')">立即体验</a>'
			+'</li>'
			+'</ul>';
			  $(".pwsj_right_czrz_cont").append(content);
				}
			
			pageList(data,6);
		  }
		  
	  });
  }

   $(function(){
	  goToPage(1,6);
  }); 
  
  
  function login(userid){
			$.ajax({
				url : '<%=basePath %>tempuser/login',
				data : {
					Id:userid
				},
				async:false,
				type : 'POST',
				success : function(data) {
					if(data.opResult == '0'){
						location.href = '<%=basePath %>user/m/userflow.jsp';
					}else {
						alert(data.msgDesc);
					}
				}
			});
		}
	
</script>
<title>体验</title>
</head>
<body>
<!-- 头部区域_begin -->
<div class="container">
	<div class="header">
		<p class="pwysj_p">配网云数据</p>
		<ul>
			<li ><a href="<%=basePath %>web/home.jsp">首页</a></li>
			<li><a href="<%=basePath%>web/jjfa.jsp">解决方案</a></li>
			<li><a href="<%=basePath %>web/download.jsp">下载</a></li>
			<li class="li_cur"><a href="<%=basePath %>web/experience.jsp"  class="cur">体验</a></li>
			<li><a href="<%=basePath %>web/about.jsp">关于</a></li>
		</ul>
		<div class="right">
			<a href="<%=basePath %>user/login.jsp" class="login">登 录</a>
			<a href="<%=basePath %>user/register.jsp" class="regist">注 册</a>
		</div>
	</div>
</div>
<!-- 头部区域_end -->

<!-- 主体区域_begin -->
<img src="images/news_down.jpg" style="width:100%;" alt="" />
<div class="container news_load_box">
	<!-- 条件_begin -->
	<div class="pwsj_right_czrz_cont_title">
		<ul class="czrz_title_ul">
			<li class="number" style="width:6%;">序号</li>
			<li class="time" style="width:32%;">用户名</li>
			<li class="username" style="width:16%;">姓名</li>
			<li class="role" style="width:30%;">角色</li>
			<li class="username" style="width:14%;">操作</li>
		</ul>				
	</div>
	<!-- 条件_end -->

	<!-- 结果_begin -->
	<div class="pwsj_right_czrz_cont">
	</div>

	</div>
<!-- 主体区域_end -->

<!-- 分页_begin -->
	    <div class="page">
           <a href="#">首页</a>
           <a href="#">上一页</a>
           <a class="intro" href="#">1</a>
           <a href="#">下一页</a>
           <a href="#">末页</a>
        </div>
	<!-- 分页_end -->
<!-- 底部区域_begin -->
<%@ include file="/web/foot.jsp"%>
<!-- 底部区域_end -->
<script src="<%=basePath %>web/js/show_common.js" type="text/javascript"></script>
</body>
</html>
